Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: table-col-sort-button: opt-in to prefer-fixed-positioning for dropdown #5338

Merged
merged 3 commits into from
Jan 22, 2025

Conversation

margaree
Copy link
Contributor

Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-5338/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

Comment on lines +667 to +675
it('col-sort-button-dropdown-open-short-flag-off', async() => {
window.D2L = {};
const elem = await createTableFixture(html`
<thead>${createSortableButtonDropdownHeaderRow()}</thead>
<tbody>${createRows([1])}</tbody>
`);
await clickElem(elem.shadowRoot.querySelector('d2l-table-col-sort-button'));
await expect(elem).to.be.golden();
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not totally necessary, though it shows the problem. Would eventually get removed.

@margaree margaree marked this pull request as ready for review January 22, 2025 16:43
@margaree margaree requested a review from a team as a code owner January 22, 2025 16:43
@@ -8,6 +8,9 @@
import '../../demo/demo-page.js';
import './table-test.js';
</script>
<script>
window.D2L = { LP: { Web: { UI: { Flags: { Flag: () => true } } } } };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this part needed? I would have expected any code checking a flag to use an optional chain on this. I guess if it's not defaulting to true after that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy pasted from another spot - I'll check if I can simplify

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yup nevermind it wasn't defaulting to true so that was why this was needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Wonder if it's worth a comment with the flag name just so we know we can remove this when either the flag defaults to true or is removed entirely? Otherwise this page could end up with some weird behaviour in the future!

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@margaree margaree merged commit 3d13249 into main Jan 22, 2025
6 checks passed
@margaree margaree deleted the table-col-sort-button-opt-in-prefer-fixed-positioning branch January 22, 2025 18:38
Copy link

🎉 This PR is included in version 3.82.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants